home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / telecomm / bbs / ddbbs101.lha / Developer / DoorMessage.Structure < prev    next >
Encoding:
Text File  |  1995-03-11  |  21.9 KB  |  481 lines

  1.  
  2.                    DayDream BBS: Door Control Structure
  3.                    ------------------------------------
  4.  
  5. OFFSET  TYPE     LENGTH  DESCRIPTIO.N                                     FLAGS
  6. ==============================================================================
  7.  0000   WORD       02    DOOR COMMAND ID / RETURN CODE                     (-)
  8.  0002   LONG WORD  04    COMMAND DATA FIELD #1                             (-)
  9.  0006   LONG WORD  04    COMMAND DATA FIELD #2                             (-)
  10.  0010   LONG WORD  04    COMMAND DATA FIELD #3                             (-)
  11.  0014   STRING     86    ROOM FOR MISCELLANEOUS VARIABLES                  (-)
  12.  0100   -- END --  00    END OF DOOR CONTROL STRUCTURE                     (-)
  13. ==============================================================================
  14.  
  15.  
  16.                         DayDream BBS: Door Commands
  17.                         ---------------------------
  18.  
  19. ===( ID: 00000 - Exit Door Handler )==========================================
  20.  
  21. Function  : This  command  reports DayDream  BBS that the door  is about to
  22.             terminate. DayDream will ReplyMsg() to this request, which will
  23.             be the last activity between the door program and DayDream BBS.
  24.             DD_DoorHandler will be closed and user returned  to the system.
  25.  
  26. Parameters: None
  27.  
  28. Returns   : Return code of zero to indicate exit
  29.  
  30. ===( ID: 00001 - Type String )================================================
  31.  
  32. Function  : Prints specified string of characters to remote user's display,
  33.             local screen or both. Possible ANSI codes will be automatically
  34.             stripped, if user has chosen an ASCII display mode. When in need
  35.             of changing line, string only needs to contain a linefeed, carriage
  36.             return (ASCII 13) will be inserted automatically.
  37.  
  38. Parameters: Data 1 <> Pointer to the string
  39.  
  40. Note      : You can include carriage returns in the text to use several lines,
  41.             but remember not to type anything longer than 200 lines at once.
  42.  
  43. Returns   : NULL in case of a fatal error or 1L when succesful
  44.  
  45. ===( ID: 00002 - Prompt For User Input )======================================
  46.  
  47. Function  : Prompts user to enter a string. Length will  be restricted as
  48.             requested by the door. Full support for ANSI cursor sequences
  49.             is given, so that user can easily move through the string and
  50.             modify as required.
  51.  
  52. Parameters: Data 1 <> Pointer to the buffer, where the final string will be
  53.                       inserted. To  define a default  string, put  it here,
  54.                       otherwise you MUST specify a NULL-string.
  55.             Data 2 <> Specify maximum length in upper word and a few control
  56.                       bits in the lower one.
  57.  
  58.                       BIT  WHAT WILL HAPPEN IF BIT IS SET
  59.                       ======================================================
  60.                        0   Hidden mode, print *s instead of real characters
  61.                        1   Don't print CR+LF after receiving return code
  62.                        2   Don't allow any characters illegal in filenames
  63.  
  64. Returns   : NULL in case of a fatal error or 1L when succesful
  65.  
  66. ===( ID: 00003 - Inquire Structure Pointers )=================================
  67.  
  68. Function  : This command will return with pointers to several significant
  69.             system structures, such as user structure etc.
  70.  
  71. Parameters: None
  72.  
  73. Returns   : Data 1 <> Various bits concerning system settings:
  74.  
  75.                       BIT  MEANING WHEN SET
  76.                       ======================================================
  77.                        0   Remote connection, otherwise local only
  78.  
  79.             Data 2 <> User's actual last call date and time
  80.  
  81.             Misc 1 <> Array of long word pointers as follows:
  82.  
  83.                       OFFSET  POINTER
  84.                       ==================================================
  85.                        0000   Dos-Library Base Address
  86.                        0004   Intuition-Library Base Address
  87.                        0008   Graphics-Library Base Address
  88.                        0012   ReqTools-Library Base Address
  89.                        0016   DiskFont-Library Base Address
  90.                        0020   Timer-Device Base
  91.                        0024   DayDream BBS Server Unit Message Port
  92.                        0028   Archivers.DAT Pointer
  93.                        0032   DayDream.DAT Pointer
  94.                        0036   Display.DAT Pointer
  95.                        0040   Pointer To Current Display Mode Structure
  96.                        0044   Conferences.DAT Pointer
  97.                        0048   Pointer To Current Conference Structure
  98.                        0052   Pointer To Current Conference's Message Bases
  99.                        0056   Pointer To Current Message Base Structure
  100.                        0060   Protocols.DAT Pointer
  101.                        0064   DayDream BBS Screen Pointer
  102.                        0068   Pointer To Current User's Structure
  103.                        0072   ExternalCommands.DAT Pointer
  104.                        0076   Schedule.DAT Pointer
  105.                        0080   Pointer to a string containing door parameters
  106.  
  107. Note      : These pointers  are provided to save  you from some  typing. For
  108.             example, you could just pick the library bases from here without
  109.             having to open them yourself.
  110.  
  111. CAUTION!  : _NEVER_ USE THESE POINTERS AFTER DAYDREAM HAS CLOSED IT'S DOORPORT
  112.  
  113. ===( ID: 00004 - Type ASCII/ANSI File )=======================================
  114.  
  115. Function  : This command outputs an ASCII or ANSI file into remote terminal,
  116.             local screen or both.
  117.  
  118. Parameters: Data 1 <> Pointer to the filename
  119.             Data 2 <> Nothing
  120.             Data 3 <> Control bits as follows:
  121.  
  122.                       BIT  WHAT WILL HAPPEN IF SET
  123.                       ==================================================
  124.                       000  Add correct path and file extension according
  125.                            to the current display mode settings. If this
  126.                            bit is set, you only need to specify the file
  127.                            name itself. Final name could look like, say,
  128.                            DayDream:Display/ISO/<filename>.GFX.Otherwise
  129.                            DayDream  will attempt  to directly open  the
  130.                            file, without any modifications on it's name.
  131.                       001  In case file couldn't be found,show a visible
  132.                            error message instead of quiting quietly.
  133.  
  134. ===( ID: 00005 - Prompt User For Simple Yes Or No  )==========================
  135.  
  136. Function  : This function asks user to answer a simple yes or no question.
  137.             Door program must type the question by itself, since  all this
  138.             function outputs is an ASCII string "Yes" or "No" based on the
  139.             user's answer.
  140.  
  141. Parameters: Data 1 <> Default answer: 0 = No and 1 = Yes
  142.  
  143. Returns   : Data 1 <> User's answer using the values stated above
  144.             R-Code <> NULL in case of a fatal error or 1L when succesful
  145.  
  146. ===( ID: 00006 - Scan UserBase For Specified User Account )===================
  147.  
  148. Function  : This function scans user database (UserBase.DAT) in order to find
  149.             the specified  account. Match can be made in real name or handle.
  150.             Operation is fully non-case-sensitive.
  151.  
  152. Parameters: Data 1 <> Pointer to the search string, wildcards are NOT supported
  153.             Data 2 <> In case one account, for a reason or an another, has to
  154.                       be skipped, it's offset must be provided here. Supply -1L
  155.                       to disable this feature.
  156.  
  157. Returns   : Data 1 <> An offset to the matching account if one was found in the
  158.                       first place. Check >R-Code< first.
  159.             Data 2 <> NULL if match was in user's real name or 1L if it was in
  160.                       the handle.
  161.             R-Code <> NULL if an error occurred, 1W if no match was found or
  162.                       2W when a match was found. If this value is <> 2W, fields
  163.                       Data 1 and Data 2 may contain just about any value.
  164.  
  165. ===( ID: 00007 - UpDate DayDream Data Structures )============================
  166.  
  167. Function  : This function must be called after any DayDream structure has
  168.             been modified. Please remember to observe extreme cautiousness,
  169.             since careless modifications will lead to a system crash.
  170.  
  171. Parameters: Data 1 <> Pass NULL for compability with future revisions
  172.             Data 2 <> Pass NULL for compability with future revisions
  173.             Data 3 <> Pass NULL for compability with future revisions
  174.  
  175. Returns   : R-Code <> NULL if an error occurred and 1L when successful
  176.  
  177. ===( ID: 00008 - Convert an UNiX Style Date To An ASCII String )================
  178.  
  179. Function  : This function will convert an UNiX style date and time values to
  180.             plain ASCII strings. Time can be read from system clock if asked to.
  181.  
  182. Parameters: Data 1 <> Pointer to a work area of twenty bytes  in which DayDream
  183.                       will store the output string 'DD.MM.YYYY',0,'HH:MM:SS',0.
  184.                       DO NOT count on  DayDream setting '.' and ':'  characters
  185.                       between numerical  values; you have to set them yourself!
  186.                       Note that entries will be provided as in Europe.
  187.             Data 2 <> Amount of seconds since 1.1.1978 to  be converted, or -1L
  188.                       to read value from the system clock.
  189. Returns   : Data 1 <> Amount of seconds converted into a string
  190.             R-Code <> NULL if an error occurred and 1L when successful
  191.  
  192. ===( ID: 00009 - Perform File Transfer With A XPR-Protocol )====================
  193.  
  194. Function  : Purpose of this function is to provide an easy way to handle file
  195.             transfers. It is possible to perform  both send and  receive with
  196.             this function. Operation will be fully automatic and independent.
  197.  
  198. Parameters: Data 1 <> Pointer to a data block, consisting of NULL-terminated
  199.                       strings including paths and actual file names of files
  200.                       to be transferred. End  of the block will be  signaled
  201.                       with a $FF (Byte). When receiving, simply pass address
  202.                       of a block containing NULL + termination character.
  203.             Data 2 <> When up, lowest bit will  indicate  send. Otherwise,
  204.                       receive mode will be executed. Leave other bits down
  205.                       for future compability.
  206.             Misc 1 <> Table of miscellaneous variables as follows:
  207.  
  208.                       OFFSET   TYPE     MEANING
  209.                       =======================================================
  210.                        0000    LONG     Pointer to a valid AmigaDOS pathname.
  211.                                         When sending, files with no path spec
  212.                                         will be  looked for in this path, and
  213.                                         when receiving, files will be  placed
  214.                                         in this directory.
  215.  
  216. Returns:    R-Code <> NULL if an error occurred and 1L when successful
  217.  
  218. ===( ID: 00010 - GET OR SET LASTREAD AND AUTOSCAN MAIL POINTERS )===============
  219.  
  220. Function  : This function makes it easy to read and set last read and auto scan
  221.             pointers of any user. Please  be extremely  careful when  modifying
  222.             these values,since failed modifications may lead to a unrecoverably
  223.             corrupted message base.
  224.  
  225. Parameters: Data 1 <> This fields actually consist of three separate values:
  226.  
  227.                       Lower  Word (Bits 00-15) /
  228.  
  229.                       Lower  Byte (Bits 00-07) = Conference number
  230.                       Higher Byte (Bits 08-15) = Message Base Number
  231.  
  232.                       Higher Word (Bits 16-31) = Account Number or NULL
  233.  
  234.                       By passing a value of NULL  in the higher word, actions
  235.                       will be made on the  current user. In case of any other
  236.                       value, changes  will be made to the <n>th  account. So,
  237.                       a value of 1 would make this function to operate on the
  238.                       very first structure found from the MsgBase.LRP file.
  239.  
  240.             Data 2 <> Pass NULL when only READing AutoScan  and LastRead values.
  241.                       If you want to  write new  values, specify  new  value for
  242.                       AutoScan in the lower word, and LastRead in the upper one.
  243.  
  244.             Data 3 <> Pass NULL for compability with future revisions
  245.  
  246. Returns   : Data 1 <> Lower  Word (Bits 00-15) = Auto Scan Pointer
  247.                       Higher Word (Bits 15-31) = Last Read Pointer
  248.  
  249.                       Note: When setting new values, old pointers will be
  250.                             returned.
  251.  
  252.             R-Code <> NULL if an error occurred and 1L when successful
  253.  
  254. ===( ID: 00011 - WAIT FOR A HOTKEY )============================================
  255.  
  256. Function  : This function simply waits for a single keypress from either the
  257.             local console or remote  terminal. After receiving a  character,
  258.             this function will immediately return with no further activity.
  259.  
  260. Parameters: Data 1 <> Parameters: BiT  WHAT WILL HAPPEN IF SET
  261.                                   ==========================================
  262.                                   000  Received character will be printed to
  263.                                        the local and remote screens.
  264.                                   001  Carriage Return  (CR=$0D) & Line Feed
  265.                                        (LF=$0A) will be included and printed
  266.                                        after the actual character. Note that
  267.                                        this won't do a thing unless BiT 0 is
  268.                                        also set.
  269.                   002  Check cursor keys. If this is active,
  270.                        cursor keys will be returned as  fol-
  271.                        lows:
  272.  
  273.                        250 - Up
  274.                        251 - Down
  275.                        252 - Right
  276.                        253 - Left
  277.  
  278.             Data 2 <> Pass NULL for compability with future revisions
  279.             Data 3 <> Pass NULL for compability with future revisions
  280.  
  281. Returns   : R-Code <> Received character or NULL if failed
  282.  
  283. Note      : The character is located in the upper byte of the word.
  284.             Therefore you should read it as a byte from offset 0.
  285.  
  286. ===( ID: 00012 - SCAN FILE DIRECTORIES )========================================
  287.  
  288. Function  : This function will scan all the file directories in the specified
  289.             conference and see if any of the files matches with given string;
  290.             wildcards allowed, of course. When a match is found, this routine
  291.             will  call a hook  routine with path, name  and size of  the file 
  292.             as it's  parameters allowing it to process the file in any wanted
  293.             way. After  the hook has  returned, scanning will or will  not be
  294.             continued depending on  whether  the search  string contained any
  295.             wildcards (if it didn't, no more than one match is possible).
  296.  
  297. Parameters: Data 1 <> Conference number in the lowest byte. Leave bits from
  298.                       eight (8) to thirtyone (31) down for compability with
  299.                       future revisions.
  300.             Data 2 <> Pointer to the search string, wildcards allowed.
  301.             Data 3 <> Pointer to the hook routine to call:
  302.  
  303.                       Hook(Path, Filename, Size, UserData);
  304.                            A0    A1        D0    D1
  305.  
  306.                       >WARNING< HOOK ROUTINE MAY ABSOLUTELY NOT
  307.                       MODIFY ANY SYSTEM   REGISTERS  UNLESS THE
  308.                       ORIGINAL VALUES ARE RETURNED BEFORE EXIT!
  309.  
  310.                       If this is NULL, use File tagging-routines of DayDream.
  311.  
  312.             Misc 1 <> Table of miscellaneous variables as follows:
  313.  
  314.                       OFFSET   TYPE     MEANING
  315.                       =======================================================
  316.                        0000    LONG     User  data  variable - will be  given
  317.                                         to Hook() routine  as provided  here.
  318.                                         This  will just pass  through DD  and
  319.                                         doesn't   have  any effect   on  DD's
  320.                                         operation. With  this  field you  can
  321.                                         easily pass some data to your hook.
  322.  
  323. Returns   : R-Code <> One of the following:
  324.  
  325.                       0 - Operation successful
  326.                       1 - Not enough memory (only 2048 bytes needed)
  327.                       2 - Specified conference not found
  328.                       3 - Specified conference doesn't have any file directories
  329.  
  330. ===( ID: 00013 - ADD FILE TO A DOWNLOAD REQUEST )===============================
  331.  
  332. Function  : This function will add a file to the download request. Current dload
  333.             request will be checked first to avoid  possible duplicate  entries.
  334.             If no duplicate entry or other  errors occurred, file will  be added
  335.             to the filechain.
  336.  
  337. Parameters: Data 1 <> Pointer  to the  path  where the file  to be added  can be
  338.                       found. PATH MUST END WITH A SLASH ('/') OR COLON (':')!
  339.             Data 2 <> Pointer to the actual filename (format: FILENAME.EXT)
  340.             Data 3 <> Some parameters as follows:
  341.  
  342.                       BIT    MEANING IF SET
  343.                       =====================================================
  344.                       000    FREE DOWNLOAD
  345.                              - File will be flagged even though ratios
  346.                                wouldn't normally allow it.
  347.                              - Downloading  this file  won't  increase 
  348.                                downloaded files / bytes counters.
  349.  
  350.             Misc 1 <> Table of miscellaneous variables as follows:
  351.  
  352.                       OFFSET   TYPE     MEANING
  353.                       =======================================================
  354.                        0000    LONG     SIZE OF THE FILE IN BYTES
  355.  
  356. Returns   : R-Code <> One of the following:
  357.  
  358.                       0 - Operation successful
  359.                       1 - Duplicate entry found
  360.                       2 - File ratio problems
  361.                       3 - Byte ratio problems
  362.                       4 - Not enough memory
  363.  
  364. ===( ID: 00014 - Disconnect user )===========================================
  365.  
  366. Function  : This function will disconnect user from BBS.
  367.  
  368. Parameters: None
  369.  
  370. Returns   : Nothing
  371.  
  372. ===( ID: 00015 - Run DayDream Command )======================================
  373.  
  374. Function  : Allows use of DayDream's menu commands (also doors).
  375.  
  376. Parameters: Data 1 <> Pointer to the string to be executed (Eg. "N S A")
  377.  
  378. Returns   : Nothing
  379.  
  380. ===( ID: 00016 - Reset idle counter )========================================
  381.  
  382. Function  : This function will reset the idle-counter. Useful for doors
  383.         having own serial/console routines, before and after archiving
  384.         something etc. Note that hotkey, prompt etc. routines reset
  385.         the idle counter automatically.
  386.  
  387. Parameters: None
  388.  
  389. Returns   : Nothing
  390.  
  391. ===( ID: 00017 - Relogin )===================================================
  392.  
  393. Function  : Same as exit door handler, except this will relogin user to the
  394.             system.
  395.  
  396. Parameters: None
  397.  
  398. Returns   : Nothing
  399.  
  400. ===( ID: 00018 - Inquire Structure Pointers 2 )==============================
  401.  
  402. Function  : This command will return with pointers to several significant
  403.             system structures, such as selected areas etc..
  404.  
  405. Parameters: None
  406.  
  407. Returns   : Data 1 <> Bps rate of current call
  408.  
  409.             Misc 1 <> Array of long word pointers as follows:
  410.  
  411.                       OFFSET  POINTER
  412.                       ==================================================
  413.                        0000   Node Structure
  414.                0004   Node Structure of current node
  415.                        0008   Pointer to incoming conversion table or null
  416.                0012   Pointer to outgoing conversion table or null
  417.                0016   Pointer to Security data of current user
  418.                        0020   Pointer to current Selected.DAT
  419.                0024   Pointer to IO-Device.DAT of current node
  420.                0028   Pointer to the door name
  421.                0032   Pointer to MultiNode.DAT
  422.  
  423. CAUTION!  : _NEVER_ USE THESE POINTERS AFTER DAYDREAM HAS CLOSED IT'S DOORPORT
  424.  
  425. ===( ID: 00019 - Join Conference )============================================
  426.  
  427. Function  : This function allows you to change conference.
  428.  
  429. Parameters: Data 1 <> Number of conference to join.
  430.             Data 2 <> Some parameters as follows:
  431.  
  432.                       BIT    MEANING IF SET
  433.                       =====================================================
  434.                       000    Ask new conference if not found.
  435.               001    Quick mode. This won't load any conference
  436.                  related files etc. If you use this, you MUST
  437.                  return to the original conference before exiting.
  438.               002    Skip JoinConference.TXT|GFX
  439.  
  440. ===( ID: 00020 - Change Msg Base )============================================
  441.  
  442. Function  : This function allows you to change message base.
  443.  
  444. Parameters: Data 1 <> Number of message base to change.
  445.             Data 2 <> Some parameters as follows:
  446.  
  447.                       BIT    MEANING IF SET
  448.                       =====================================================
  449.                       000    Show menu if Data 1 = 0.
  450.               001    Do not type messagebase status fields after
  451.                  changing the message base.
  452.  
  453. ===( ID: 00021 - Run internal command )=======================================
  454.  
  455. Function  : Same as "Run DayDream command" expect only INTERNAL commands
  456.         will be executed. So external commands will be skipped.
  457.  
  458. Parameters: Data 1 <> Pointer to the string to be executed (Eg. "N S A")
  459.  
  460. Returns   : Nothing
  461.  
  462. ===( ID: 00022 - Check for character )========================================
  463.  
  464. Function  : This function just checks if theres character in input buffer
  465.         and if there is, then returns it. Otherwise returns null.
  466.  
  467. Parameters: None
  468.  
  469. Returns   : The character is located in the upper byte of the word.
  470.             Therefore you should read it as a byte from offset 0.
  471.  
  472. ===( ID: 00023 - Edit File )==================================================
  473.  
  474. Function  : Edit file using DD's built in line editor.
  475.  
  476. Parameters: Data 1 <> Filename to edit (MODE_NEWFILE).
  477.  
  478. Returns   : Nothing.
  479.  
  480.  
  481.